Version 2.0 of the eAIP Core Toolbox introduces support for the new eAIP Specification 2.0 and specifically for the search functionality. This chapter gives instructions for eAIP 2.0 implementers on how to set up a search engine back-end system. This chapter is addressed to IT department staff members. Although the eAIP 2.0 Specification recommends to offer a search functionality that is independent from the distribution media, the Core Toolbox only gives instructions to set up a server-based search engine. The technical solution described herein can be used for a CD-ROM-based search feature, but the instructions to do so are not provided here.
The instructions below assume the server is running on a Linux operating system. Other operating systems are supported by the software used here, but instructions and scripts will need to be adapted.
The eAIP 2.0 Core Toolbox implements the search feature using third-party open source software products. The following software products must be installed on the computer that will become the eAIP search engine back-end:
Java Runtime Environment version 1.5 or above.
Apache Tomcat version 5.5 or above. The instructions below are written for v5.5 and assume it has been installed following the Linux Filesystem Hierarchy Standard (FHS).
Apache Solr version 1.4.1. The instructions below assume that it was installed in /usr/share/Solr.
curl version 7.18.0 (other versions may work as well).
Create a directory /var/lib/Solr_home. This is where Solr's index and custom files will be stored.
Copy the contents of directory /usr/share/Solr/example/solr to /var/lib/Solr_home.
Edit the file /var/lib/Solr_home/conf/solrconfig.xml and modify the dataDir property as follows: <dataDir>${solr.data.dir:/var/lib/Solr_home/data}</dataDir> This is the directory where Solr will create the index.
Copy 'Solr_Result.xslt', located in the eAIP Toolbox in tools/search, to /var/lib/Solr_home/conf/xslt. Remove all other xsl files in this target directory.
Create directory /var/lib/Solr_home/lib.
Copy all .jar files located in /usr/share/Solr/contrib/extraction/lib and /usr/share/Solr/dist/apache-solr-cell-1.4.jar to /var/lib/Solr_home/lib.
Shutdown Tomcat
Create a file named eAIP.xml in the directory /usr/share/tomcat-5.5/conf/Catalina/localhost and copy the following in it:
<Context docBase="/var/lib/eAIP"/>
Create a file named Search.xml in the directory /usr/share/tomcat-5.5/conf/Catalina/localhost and copy the following in it:
<Context docBase="/usr/share/Solr/dist/apache-solr-1.4.1.war" path="/Search"
reloadable="true">
<Environment name="/solr/home" value="/var/lib/Solr_home" type="java.lang.String"
override="false"/>
</Context>Start Tomcat
Extract the eAIP Core Toolbox distribution to /usr/share/eAIP-Core-Toolbox.
Edit the file /usr/share/eAIP-Core-Toolbox/tools/search/index.sh with a text editor.
Set the SOLR_SERVER property to http://localhost:8080/Search (replace 8080 by the port used of your server).
Copy an eAIS Package to /var/lib/eAIP. For this procedure, let us assume that the eAIS Package directory is named "2004-07-08". We thus have a file /var/lib/eAIP/history-en-GB.html and the start page of that package is /var/lib/eAIP/2004-07-08/html/index-en-GB.html.
In a console, cd to directory /var/lib/eAIP.
Run the following command: /usr/share/eAIP-Core-Toolbox/tools/search/index.sh 2004-07-08/html. This will add all HTML files found in the directory given as parameter and in all its sub-directories to the Solr index.
Verify the index: open a Web browser to http://localhost:8080/eAIP/2004-07-08/html/index-en-GB.html, click on the Search tab, then search for some terms.